package org.budo.cmbc.sdk.entity;

import java.io.Serializable;

import org.budo.xml.XmlObject;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * @author lmw
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
public class BalInfoNew implements Serializable {
    private static final long serialVersionUID = 5070698425639557157L;

    private String acntNo;

    private String acntName;

    private String acctBal;

    private String avlBal;

    private String frzBal;

    private String state;

    private String errCode;

    private String errMsg;

    public BalInfoNew(XmlObject xml) {
        this.setAcntNo(xml.getChildNodeTextContentByName("acntNo"));
        this.setAcntName(xml.getChildNodeTextContentByName("acntName"));

        this.setAcctBal(xml.getChildNodeTextContentByName("acctBal"));
        this.setAvlBal(xml.getChildNodeTextContentByName("avlBal"));
        this.setFrzBal(xml.getChildNodeTextContentByName("frzBal"));

        this.setState(xml.getChildNodeTextContentByName("state"));
        this.setErrCode(xml.getChildNodeTextContentByName("errCode"));
        this.setErrMsg(xml.getChildNodeTextContentByName("errMsg"));
    }
}